#pragma once
#include <string>

class HexBin
{
public:
  static bool __init;
  static bool init();

  static const int BASE_LENGTH = 128;
  static const int LOOKUP_LENGTH = 16;
  static char HEX_NUMBER_TABLE[BASE_LENGTH];
  static char UPPER_CHARS[LOOKUP_LENGTH];
  static char LOWER_CHARS[LOOKUP_LENGTH];

  static std::string encode(char *bytes);

  static std::string encode(char *bytes, bool upperCase);

  /**
   * Decode hex string to a char array
   *
   * @param encoded encoded string
   * @return return array of char to encode
   */
  static const char *decode(std::string encoded);
};
